#!/bin/sh -e
# $1 = version

DIR=libjdic-$1
ZIP=jdic-$1-src.zip
TAR=../libjdic-java_$1.orig.tar.gz

wget https://jdic.dev.java.net/files/documents/880/36262/jdic-20060613-src.zip

# clean up the upstream tarball
unzip $ZIP
mv src $DIR
tar -c -z -f $TAR -X debian/orig.exclude $DIR
rm -rf $DIR $ZIP

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
  . .svn/deb-layout
  mv $TAR $origDir
  echo "moved $TAR to $origDir"
fi

exit 0
